package com.shycloud.mido.member.api.feign;

import com.shycloud.mido.common.core.constant.SecurityConstants;
import com.shycloud.mido.common.core.constant.ServiceNameConstants;
import com.shycloud.mido.common.core.util.R;
import com.shycloud.mido.member.api.entity.MsgMain;
import com.shycloud.mido.member.api.entity.MsgMemberInfo;
import com.shycloud.mido.member.api.vo.WeekMainInMemberFeignVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;

@FeignClient(value = ServiceNameConstants.MEMBER_SERVICE)
public interface RemotePushService {

	/**
	 * 新增站内消息
	 *
	 * @param msgMain 个人站内消息
	 * @return R
	 */
	@PostMapping(value = "/msg/addMsg")
	R addMsg(@RequestBody MsgMain msgMain);

	/**
	 * 发送站内消息
	 *
	 * @param msgMemberInfo
	 * @return R
	 */
	@PostMapping(value = "/msg/sendMsg")
	R sendMsg(@RequestBody MsgMemberInfo msgMemberInfo);

	/**
	 * 发送周报消息
	 *
	 * @param weekMain
	 * @return R
	 */
	@PostMapping(value = "/msg/sendWeekMsg")
	boolean sendWeekMsg(@RequestBody WeekMainInMemberFeignVO weekMain, @RequestHeader(SecurityConstants.FROM) String from);
}
